﻿#region [===== Using =====]
using System;
using Microsoft.SharePoint;
#endregion

namespace TPG.SharePoint.Workflow
{
    /// <summary>
    /// Represents the metadata provided by the association page.
    /// </summary>
    public class AssociationMetaData
        : ConfigurationMetaData
    {
        #region [===== Properties =====]
        /// <summary>
        /// Gets a value indicating if the association page is editing a 
        /// new or existing workflow association.
        /// </summary>
        public bool IsNewAssociation { get; internal set; }
        /// <summary>
        /// Gets the site-level <see cref="SPContentType" /> association target.
        /// </summary>
        /// <remarks>
        /// This property returns null when the <see cref="AssociationType" /> is 
        /// not set to <see cref="AssociationType.ContentType" />
        /// </remarks>
        public SPContentType SiteContentType
        {
            get;
            internal set;
        }

        /// <summary>
        /// Gets the list-level <see cref="SPContentType" /> association target.
        /// </summary>
        /// <remarks>
        /// This property returns null when the <see cref="AssociationType" /> is 
        /// not set to <see cref="AssociationType.ListContentType" />
        /// </remarks>
        public SPContentType ListContentType
        {
            get;
            internal set;
        }
        /// <summary>
        /// Gets the list association target.
        /// </summary>
        /// <remarks>
        /// This property returns null when the <see cref="AssociationType" /> is 
        /// not set to <see cref="AssociationType.List" />
        /// </remarks>
        public SPList List
        {
            get;
            internal set;
        }
        #endregion
    }
}
